﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true"
    CodeFile="AdvancedSearch.aspx.cs" Inherits="_Categories" Theme="Default" %>

<asp:Content ID="Content2" ContentPlaceHolderID="head" runat="server">
    <script type="text/javascript" src="js/jquery-1.7.1.min.js"></script>
    <script type="text/javascript" src="js/banners.js"></script>
    <link rel="stylesheet" href="styles/banners.css" />
    <link rel="stylesheet" href="js/advancedsearch/jquery-ui-1.9.0.custom.min.css" />
    <script src="js/advancedsearch/jquery-ui-1.9.0.custom.min.js" type="text/javascript"></script>
    <style type="text/css">
        .subcategories-left-filters div
        {
            padding-top: 5px;
            padding-right: 5px;
        }
        .subcategories-left-filters div div
        {
            padding-top: 5px;
            padding-right: 5px;
        }
        .subcategories-left-filters div label
        {
            padding-top: 5px;
            padding-right: 5px;
            margin-left: 5px;
        }
        .title-leftdiv
        {
            font-size: 25px;
            margin-left: 5px;
            font-weight: bold;
        }
        .opacityColor
        {
            -moz-opacity: .5;
            filter: alpha(opacity=50);
            opacity: .5;
        }
        .imgRefreshPrice
        {
            background-image: url("Images/refresh_18.gif");
            width: 10px;
            height: 10px;
            background-repeat: no-repeat;
        }
        .imgRefreshPrice:hover
        {
            background-color: Black;
        }
    </style>
    <script type="text/javascript" language="javascript">
        function fnGetFilters() {
            //            document.getElementById('btnHiddenSearch').click();

            $("#btnHiddenSearch").click();
        }

        $(document).ready(function () {
            banner1();
            banner2();
            banner3();

            var $h1 = $('#minprice'),
                $h2 = $('#maxprice');

            $("#slider-range").slider({
                range: true,
                min: 0,
                max: 20000,
                values: [parseInt($h1.val()), parseInt($h2.val())],
                slide: function (event, ui) {
                    $("#amount").val("Min $" + ui.values[0] + " - Max $" + ui.values[1]);
                    $("#minprice").val(ui.values[0]);
                    $("#maxprice").val(ui.values[1]);
                }
            });
            $("#amount").val("Min $" + $("#slider-range").slider("values", 0) +
            " - Max $" + $("#slider-range").slider("values", 1));

            $("#check").button();
            $("#divLeftColor").buttonset();

            $("#divLeftColor").each(function (index, domEle) {
                $("label").each(function () {
                    $(this).click(function () {
                        $(this).toggleClass("opacityColor");
                        var chk = $(this)[0].htmlFor;
                        var ischecked = $("#" + chk).is(":checked");
                        $("#" + chk).attr('checked', !ischecked);
                        fnFillAllSelected("#divLeftColor", "#colorsSelected");
                    });
                });
            });

        });    //End DocumentReady

        function fnFillAllSelected(get, set) {
            var json = fnGetChecked(get);
            $(set).val(json);
            document.getElementById('btnHiddenSearch').click();
        }

        function fnGetChecked(nameDiv) {
            var json = "";
            $(nameDiv).each(function (index, domEle) {
                $(this).children('input').each(function () {
                    if ($(this).is(':checked')) {
                        if (json.length <= 0) {
                            json = $(this).attr('id');
                        }
                        else {
                            json += "|" + $(this).attr('id');
                        }
                    }
                });
            });
            return json;
        }
        function fnCallSearch() {
            document.getElementById('btnHiddenSearch').click();
        }
    </script>
</asp:Content>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <asp:HiddenField ID="scid" runat="server" Value="0" />
    <asp:HiddenField ID="pn" runat="server" Value="1" />
    <asp:HiddenField ID="minprice" runat="server" Value="0" ClientIDMode="Static" />
    <asp:HiddenField ID="maxprice" runat="server" Value="20000" ClientIDMode="Static" />
    <asp:HiddenField ID="colorsSelected" runat="server" Value="" ClientIDMode="Static" />
    <asp:HiddenField ID="categorysSelected" runat="server" Value="" ClientIDMode="Static" />
    <asp:HiddenField ID="subCategorysSelected" runat="server" Value="" ClientIDMode="Static" />
    <asp:HiddenField ID="mesesSelected" runat="server" Value="" ClientIDMode="Static" />
    <asp:HiddenField ID="alturaSelected" runat="server" Value="" ClientIDMode="Static" />
    <asp:Button ID="btnHiddenSearch" runat="server" ClientIDMode="Static" OnClick="checked_Change"
        Style="display: none;" />
    <div class="category-left">
        <div class="category-map">
            <%--<asp:Label ID="lblRoute" runat="server"></asp:Label>--%>
            <asp:HyperLink ID="lblRoute" runat="server" CssClass="pathLink"></asp:HyperLink>
            <asp:HyperLink ID="lblRoute1" runat="server" CssClass="pathLink"></asp:HyperLink>
            <asp:HyperLink ID="lblRoute2" runat="server" CssClass="pathLink"></asp:HyperLink>
        </div>
        <br />
        <div class="subcategories-left">
            <div style="height: 50px; vertical-align: middle; text-align: center;">
                <asp:Label runat="server" ID="lblTitleLeft" CssClass="title-leftdiv" Text="BÚSQUEDA AVANZADA"></asp:Label>
            </div>
            <br />
            <br />
            <div class="subtegories" id="subcategories" runat="server">
                <div id="divLeftPriceRange" style="text-align: center; margin-right: 15px; width: 120px;">
                    <p>
                        <label for="amount" style="margin-bottom: 4px;">
                            RANGO DE PRECIOS:</label>
                    </p>
                    <div id="slider-range">
                    </div>
                    <%--<div style="width: 10px; height: 10px;">
                        <a id="imgRefreshPrice" class="imgRefreshPrice" onclick="fnCallSearch();" />
                    </div>--%>
                    <p>
                        <input type="text" id="amount" style="border: 0; font-weight: bold; width: 100%;
                            text-align: center; color: Gray; font-family: Trebuchet MS;" />
                    </p>
                </div>
                <br />
                <div class="subcategories-left-filters">
                    <asp:Label runat="server" ID="Label2" CssClass="title" Text="CATEGORÍAS"></asp:Label>
                    <div id="divLeftCategorias" runat="server" clientidmode="Static">
                        <asp:CheckBox ID="chk_category_1" runat="server" Text="Plantas" ClientIDMode="Static"
                            onclick="fnFillAllSelected('#divLeftCategorias','#categorysSelected')" /><br />
                        <asp:CheckBox ID="chk_category_2" runat="server" Text="Árboles" onclick="fnFillAllSelected('#divLeftCategorias','#categorysSelected')"
                            ClientIDMode="Static" /><br />
                        <asp:CheckBox ID="chk_category_3" runat="server" Text="Regalos" onclick="fnFillAllSelected('#divLeftCategorias','#categorysSelected')"
                            ClientIDMode="Static" /><br />
                        <asp:CheckBox ID="chk_category_4" runat="server" Text="Accesorios" onclick="fnFillAllSelected('#divLeftCategorias','#categorysSelected')"
                            ClientIDMode="Static" /><br />
                        <asp:CheckBox ID="chk_category_5" runat="server" Text="Insumos" onclick="fnFillAllSelected('#divLeftCategorias','#categorysSelected')"
                            ClientIDMode="Static" />
                    </div>
                    <br />
                    <asp:Label runat="server" ID="Label3" CssClass="title" Text="SUB-CATEGORÍAS"></asp:Label>
                    <div id="divLeftSubcategorias" runat="server" clientidmode="Static">
                    </div>
                    <br />
                    <asp:Label runat="server" ID="Label4" CssClass="title" Text="MESES DE FLORACIÓN"></asp:Label>
                    <div id="divLeftMeses" runat="server" clientidmode="Static">
                        <asp:CheckBox ID="chk_mes_1" runat="server" Text="Enero" onclick="fnFillAllSelected('#divLeftMeses','#mesesSelected')"
                            ClientIDMode="Static" /><br />
                        <asp:CheckBox ID="chk_mes_2" runat="server" Text="Febrero" onclick="fnFillAllSelected('#divLeftMeses','#mesesSelected')"
                            ClientIDMode="Static" /><br />
                        <asp:CheckBox ID="chk_mes_3" runat="server" Text="Marzo" onclick="fnFillAllSelected('#divLeftMeses','#mesesSelected')"
                            ClientIDMode="Static" /><br />
                        <asp:CheckBox ID="chk_mes_4" runat="server" Text="Abril" onclick="fnFillAllSelected('#divLeftMeses','#mesesSelected')"
                            ClientIDMode="Static" /><br />
                        <asp:CheckBox ID="chk_mes_5" runat="server" Text="Mayo" onclick="fnFillAllSelected('#divLeftMeses','#mesesSelected')"
                            ClientIDMode="Static" /><br />
                        <asp:CheckBox ID="chk_mes_6" runat="server" Text="Junio" onclick="fnFillAllSelected('#divLeftMeses','#mesesSelected')"
                            ClientIDMode="Static" /><br />
                        <asp:CheckBox ID="chk_mes_7" runat="server" Text="Julio" onclick="fnFillAllSelected('#divLeftMeses','#mesesSelected')"
                            ClientIDMode="Static" /><br />
                        <asp:CheckBox ID="chk_mes_8" runat="server" Text="Agosto" onclick="fnFillAllSelected('#divLeftMeses','#mesesSelected')"
                            ClientIDMode="Static" /><br />
                        <asp:CheckBox ID="chk_mes_9" runat="server" Text="Septiembre" onclick="fnFillAllSelected('#divLeftMeses','#mesesSelected')"
                            ClientIDMode="Static" /><br />
                        <asp:CheckBox ID="chk_mes_10" runat="server" Text="Octubre" onclick="fnFillAllSelected('#divLeftMeses','#mesesSelected')"
                            ClientIDMode="Static" /><br />
                        <asp:CheckBox ID="chk_mes_11" runat="server" Text="Noviembre" onclick="fnFillAllSelected('#divLeftMeses','#mesesSelected')"
                            ClientIDMode="Static" /><br />
                        <asp:CheckBox ID="chk_mes_12" runat="server" Text="Diciembre" onclick="fnFillAllSelected('#divLeftMeses','#mesesSelected')"
                            ClientIDMode="Static" />
                    </div>
                    <br />
                    <asp:Label runat="server" ID="Label6" CssClass="title" Text="COLOR"></asp:Label>
                    <div id="divLeftColor" runat="server" clientidmode="Static">
                        <%--<input type="checkbox" id="check1" /><label for="check1" style="background-color: #2E64FE;
                            background-image: none;"></label>
                        <input type="checkbox" id="check2" /><label for="check2"></label>
                        <input type="checkbox" id="check3" /><label for="check3"></label>--%>
                    </div>
                    <br />
                    <asp:Label runat="server" ID="Label5" CssClass="title" Text="ALTURA DE PLANTAS"></asp:Label>
                    <div id="divLeftAlturaPlantas" runat="server" clientidmode="Static">
                        <asp:CheckBox ID="chk_altura_0" runat="server" Text="0-10 cm" onclick="fnFillAllSelected('#divLeftAlturaPlantas','#alturaSelected')"
                            ClientIDMode="Static" /><br />
                        <asp:CheckBox ID="chk_altura_1" runat="server" Text="10-25 cm" onclick="fnFillAllSelected('#divLeftAlturaPlantas','#alturaSelected')"
                            ClientIDMode="Static" /><br />
                        <asp:CheckBox ID="chk_altura_2" runat="server" Text="25-50 cm" onclick="fnFillAllSelected('#divLeftAlturaPlantas','#alturaSelected')"
                            ClientIDMode="Static" /><br />
                        <asp:CheckBox ID="chk_altura_3" runat="server" Text="50-100 cm" onclick="fnFillAllSelected('#divLeftAlturaPlantas','#alturaSelected')"
                            ClientIDMode="Static" /><br />
                        <asp:CheckBox ID="chk_altura_4" runat="server" Text="100-150 cm" onclick="fnFillAllSelected('#divLeftAlturaPlantas','#alturaSelected')"
                            ClientIDMode="Static" /><br />
                        <asp:CheckBox ID="chk_altura_5" runat="server" Text="150-200 cm" onclick="fnFillAllSelected('#divLeftAlturaPlantas','#alturaSelected')"
                            ClientIDMode="Static" /><br />
                        <asp:CheckBox ID="chk_altura_6" runat="server" Text="200-300 cm" onclick="fnFillAllSelected('#divLeftAlturaPlantas','#alturaSelected')"
                            ClientIDMode="Static" /><br />
                        <asp:CheckBox ID="chk_altura_7" runat="server" Text="> 300 cm" onclick="fnFillAllSelected('#divLeftAlturaPlantas','#alturaSelected')"
                            ClientIDMode="Static" />
                    </div>
                    <br />
                    <asp:Label runat="server" ID="Label7" CssClass="title" Text="PREFERENCIAS" Style="display: none;"></asp:Label>
                    <div id="divLeftPreferencias" runat="server" clientidmode="Static" style="display: none;">
                        <%--<div style="display: inline-block">
                            <img src="http://dataclinicc.web709.discountasp.net/arb/imagessite/e8b2e595-078e-42e1-b4fa-0fc1b1d7d1db.jpg"
                                style="display: inline-block" alt="" />
                            <br />
                            <asp:CheckBox ID="CheckBox15" runat="server" Style="display: inline-block" />
                        </div>
                        <div style="display: inline-block">
                            <img src="http://dataclinicc.web709.discountasp.net/arb/imagessite/e8b2e595-078e-42e1-b4fa-0fc1b1d7d1db.jpg"
                                style="display: inline-block" alt="" />
                            <br />
                            <asp:CheckBox ID="CheckBox16" runat="server" Style="display: inline-block" />
                        </div>
                        <div style="display: inline-block">
                            <img src="http://dataclinicc.web709.discountasp.net/arb/imagessite/e8b2e595-078e-42e1-b4fa-0fc1b1d7d1db.jpg"
                                style="display: inline-block" alt="" />
                            <br />
                            <asp:CheckBox ID="CheckBox21" runat="server" Style="display: inline-block" />
                        </div>
                        <div style="display: inline-block">
                            <img src="http://dataclinicc.web709.discountasp.net/arb/imagessite/e8b2e595-078e-42e1-b4fa-0fc1b1d7d1db.jpg"
                                style="display: inline-block" alt="" />
                            <br />
                            <asp:CheckBox ID="CheckBox25" runat="server" Style="display: inline-block" />
                        </div>
                        <br />--%>
                    </div>
                </div>
                <br />
                <%-- <div style="text-align: center; vertical-align: middle; margin-right: 15px;">
                    <asp:Button ID="btnUpdateSearch" runat="server" Text="Actualiza Busqueda" CssClass="buttonUpdateSearch"
                        OnClientClick="fnGetFilters();" />
                </div>--%>
            </div>
        </div>
        <div class="categories-content">
            <%-- <asp:Image ID="sectionTop" runat="server" />
            <div style="height: 15px;">
            </div>--%>
            <%-- <div class="content-text" id="contenttext" runat="server">
            </div>
            <div style="height: 15px;">
            </div>--%>
            <div class="product-filter">
                <asp:Label ID="filterlabel" Text="Filtrar productos: " runat="server"></asp:Label>
                <asp:DropDownList ID="drpAvailables" runat="server">
                    <asp:ListItem Text="Disponibles" Value="0"></asp:ListItem>
                </asp:DropDownList>
                <asp:DropDownList ID="drpOrderBy" runat="server" AutoPostBack="true" OnSelectedIndexChanged="checked_Change">
                    <asp:ListItem Text="Ordenar por" Value="0"></asp:ListItem>
                    <asp:ListItem Text="Nombre A - Z" Value="1"></asp:ListItem>
                    <asp:ListItem Text="Nombre Z - A" Value="2"></asp:ListItem>
                    <asp:ListItem Text="Precio Menor - Mayor" Value="3"></asp:ListItem>
                    <asp:ListItem Text="Precio Mayor - Menor" Value="4"></asp:ListItem>
                </asp:DropDownList>
            </div>
            <div style="height: 15px;">
            </div>
            <div class="content-subcategories-list" id="productslist" runat="server">
            </div>
            <div style="height: 15px;">
            </div>
            <div class="paginator" id="paginator" runat="server">
            </div>
            <br />
        </div>
        <br style="clear: both;" />
    </div>
    <div class="category-right">
        <div class="main_view">
            <div class="window" id="window">
                <div class="image_reel" id="imagereel" runat="server" clientidmode="Static">
                </div>
                <div class="paging" id="paging" runat="server" clientidmode="Static">
                </div>
            </div>
        </div>
        <div class="main_view">
            <div class="window" id="window2">
                <div class="image_reel" id="imagereel2" runat="server" clientidmode="Static">
                </div>
                <div class="paging2" id="paging2" runat="server" clientidmode="Static">
                </div>
            </div>
        </div>
        <div class="main_view">
            <div class="window" id="window3">
                <div class="image_reel" id="imagereel3" runat="server" clientidmode="Static">
                </div>
                <div class="paging" id="paging3" runat="server" clientidmode="Static">
                </div>
            </div>
        </div>
    </div>
</asp:Content>
